from django.core.management.base import BaseCommand
from stocksys import models as stocksys_models


class Command(BaseCommand):
    help = 'create_stock_code_data_from_jqdata'
    def handle(self, *args, **options):
        self.stdout.write(self.style.SUCCESS('清除股票数据'))
        stocksys_models.StockClass.objects.all().delete()
        stocksys_models.Stock.objects.all().delete()
        self.stdout.write(self.style.SUCCESS('结束任务'))
